package com.weijin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weijin.mapper.UserMapper;
import com.weijin.model.entities.User;
import com.weijin.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户服务实现类
 *
 * @Author WeiJin
 * @Version 1.0
 * @Date 2025/3/28 14:00
 */
@Service
public class UserServiceImpl implements IUserService {


    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> queryAllUsers() {
        LambdaQueryWrapper<User> wrapper = new LambdaQueryWrapper<>();
        return userMapper.selectList(wrapper);
    }

    @Override
    public User queryUserById(String id) {
        return userMapper.selectById(id);
    }
}
